package fr.fitec.qcmPlus.beans;

import java.io.Serializable;
import java.sql.Timestamp;

import fr.fitec.qcmPlus.constants.QcmConstants;

public class Reponse  implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private int idReponse = QcmConstants.ID_INVALIDE;
	private int idQuestion = QcmConstants.ID_INVALIDE;
	private String nom;
	private String bonneReponse;
	private String statut;
	private Timestamp date_creation;
	private Timestamp date_maj;
	private Timestamp date_suppr;
	
	public Reponse(){
	}
	
	
	
	public Reponse(Reponse rep) {
		this.idReponse     = rep.idReponse;
		this.idQuestion    = rep.idQuestion;
		this.nom           = rep.nom;
		this.bonneReponse  = rep.bonneReponse;
		this.statut        = rep.statut;
		this.date_creation = rep.date_creation;
		this.date_maj      = rep.date_maj;
		this.date_suppr    = rep.date_suppr;
	}

	public int getIdReponse() {
		return idReponse;
	}
	public void setIdReponse(int idReponse) {
		this.idReponse = idReponse;
	}
	public int getIdQuestion() {
		return idQuestion;
	}
	public void setIdQuestion(int idQuestion) {
		this.idQuestion = idQuestion;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getBonneReponse() {
		return bonneReponse;
	}
	public void setBonneReponse(String bonneReponse) {
		this.bonneReponse = bonneReponse;
	}
	public String getStatut() {
		return statut;
	}
	public void setStatut(String statut) {
		this.statut = statut;
	}
	public Timestamp getDate_creation() {
		return date_creation;
	}
	public void setDate_creation(Timestamp date_creation) {
		this.date_creation = date_creation;
	}
	public Timestamp getDate_maj() {
		return date_maj;
	}
	public void setDate_maj(Timestamp date_maj) {
		this.date_maj = date_maj;
	}
	public Timestamp getDate_suppr() {
		return date_suppr;
	}
	public void setDate_suppr(Timestamp date_suppr) {
		this.date_suppr = date_suppr;
	}
	
    @Override
    public String toString()
    {
        final StringBuilder sb = new StringBuilder();
        
		sb.append("idReponse: "+this.getIdReponse()).append("\n");
        sb.append("idQuestion: "+this.getIdQuestion()).append("\n");
        sb.append("nom: "+this.getNom()).append("\n");
        sb.append("bonnReponse: "+this.getBonneReponse()).append("\n");
        sb.append("statut: "+this.getStatut()).append("\n");
        sb.append("date creation: "+this.getDate_creation()).append("\n");
        sb.append("date maj: "+this.getDate_maj()).append("\n");
        sb.append("date suppr: "+this.getDate_suppr());

        return sb.toString();
    }
}
